/*
 Navicat Premium Data Transfer

 Source Server         : sql server
 Source Server Type    : SQL Server
 Source Server Version : 16001135 (16.00.1135)
 Source Catalog        : Graduate Admission System
 Source Schema         : dbo

 Target Server Type    : SQL Server
 Target Server Version : 16001135 (16.00.1135)
 File Encoding         : 65001

 Date: 06/12/2024 21:49:51
*/


-- ----------------------------
-- Table structure for auth_permission
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[auth_permission]') AND type IN ('U'))
	DROP TABLE [dbo].[auth_permission]
GO

CREATE TABLE [dbo].[auth_permission] (
  [id] int  IDENTITY(1,1) NOT NULL,
  [name] nvarchar(255) COLLATE Chinese_PRC_CI_AS  NOT NULL,
  [content_type_id] int  NOT NULL,
  [codename] nvarchar(100) COLLATE Chinese_PRC_CI_AS  NOT NULL
)
GO

ALTER TABLE [dbo].[auth_permission] SET (LOCK_ESCALATION = TABLE)
GO


-- ----------------------------
-- Records of auth_permission
-- ----------------------------
SET IDENTITY_INSERT [dbo].[auth_permission] ON
GO

INSERT INTO [dbo].[auth_permission] ([id], [name], [content_type_id], [codename]) VALUES (N'1', N'Can add log entry', N'1', N'add_logentry')
GO

INSERT INTO [dbo].[auth_permission] ([id], [name], [content_type_id], [codename]) VALUES (N'2', N'Can change log entry', N'1', N'change_logentry')
GO

INSERT INTO [dbo].[auth_permission] ([id], [name], [content_type_id], [codename]) VALUES (N'3', N'Can delete log entry', N'1', N'delete_logentry')
GO

INSERT INTO [dbo].[auth_permission] ([id], [name], [content_type_id], [codename]) VALUES (N'4', N'Can view log entry', N'1', N'view_logentry')
GO

INSERT INTO [dbo].[auth_permission] ([id], [name], [content_type_id], [codename]) VALUES (N'5', N'Can add permission', N'2', N'add_permission')
GO

INSERT INTO [dbo].[auth_permission] ([id], [name], [content_type_id], [codename]) VALUES (N'6', N'Can change permission', N'2', N'change_permission')
GO

INSERT INTO [dbo].[auth_permission] ([id], [name], [content_type_id], [codename]) VALUES (N'7', N'Can delete permission', N'2', N'delete_permission')
GO

INSERT INTO [dbo].[auth_permission] ([id], [name], [content_type_id], [codename]) VALUES (N'8', N'Can view permission', N'2', N'view_permission')
GO

INSERT INTO [dbo].[auth_permission] ([id], [name], [content_type_id], [codename]) VALUES (N'9', N'Can add group', N'3', N'add_group')
GO

INSERT INTO [dbo].[auth_permission] ([id], [name], [content_type_id], [codename]) VALUES (N'10', N'Can change group', N'3', N'change_group')
GO

INSERT INTO [dbo].[auth_permission] ([id], [name], [content_type_id], [codename]) VALUES (N'11', N'Can delete group', N'3', N'delete_group')
GO

INSERT INTO [dbo].[auth_permission] ([id], [name], [content_type_id], [codename]) VALUES (N'12', N'Can view group', N'3', N'view_group')
GO

INSERT INTO [dbo].[auth_permission] ([id], [name], [content_type_id], [codename]) VALUES (N'13', N'Can add user', N'4', N'add_user')
GO

INSERT INTO [dbo].[auth_permission] ([id], [name], [content_type_id], [codename]) VALUES (N'14', N'Can change user', N'4', N'change_user')
GO

INSERT INTO [dbo].[auth_permission] ([id], [name], [content_type_id], [codename]) VALUES (N'15', N'Can delete user', N'4', N'delete_user')
GO

INSERT INTO [dbo].[auth_permission] ([id], [name], [content_type_id], [codename]) VALUES (N'16', N'Can view user', N'4', N'view_user')
GO

INSERT INTO [dbo].[auth_permission] ([id], [name], [content_type_id], [codename]) VALUES (N'17', N'Can add content type', N'5', N'add_contenttype')
GO

INSERT INTO [dbo].[auth_permission] ([id], [name], [content_type_id], [codename]) VALUES (N'18', N'Can change content type', N'5', N'change_contenttype')
GO

INSERT INTO [dbo].[auth_permission] ([id], [name], [content_type_id], [codename]) VALUES (N'19', N'Can delete content type', N'5', N'delete_contenttype')
GO

INSERT INTO [dbo].[auth_permission] ([id], [name], [content_type_id], [codename]) VALUES (N'20', N'Can view content type', N'5', N'view_contenttype')
GO

INSERT INTO [dbo].[auth_permission] ([id], [name], [content_type_id], [codename]) VALUES (N'21', N'Can add session', N'6', N'add_session')
GO

INSERT INTO [dbo].[auth_permission] ([id], [name], [content_type_id], [codename]) VALUES (N'22', N'Can change session', N'6', N'change_session')
GO

INSERT INTO [dbo].[auth_permission] ([id], [name], [content_type_id], [codename]) VALUES (N'23', N'Can delete session', N'6', N'delete_session')
GO

INSERT INTO [dbo].[auth_permission] ([id], [name], [content_type_id], [codename]) VALUES (N'24', N'Can view session', N'6', N'view_session')
GO

SET IDENTITY_INSERT [dbo].[auth_permission] OFF
GO


-- ----------------------------
-- Auto increment value for auth_permission
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[auth_permission]', RESEED, 24)
GO


-- ----------------------------
-- Indexes structure for table auth_permission
-- ----------------------------
CREATE UNIQUE NONCLUSTERED INDEX [auth_permission_content_type_id_codename_01ab375a_uniq]
ON [dbo].[auth_permission] (
  [content_type_id] ASC,
  [codename] ASC
)
WHERE ([content_type_id] IS NOT NULL AND [codename] IS NOT NULL)
GO

CREATE NONCLUSTERED INDEX [auth_permission_content_type_id_2f476e4b]
ON [dbo].[auth_permission] (
  [content_type_id] ASC
)
GO


-- ----------------------------
-- Primary Key structure for table auth_permission
-- ----------------------------
ALTER TABLE [dbo].[auth_permission] ADD CONSTRAINT [PK__auth_per__3213E83F6B777D62] PRIMARY KEY CLUSTERED ([id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Foreign Keys structure for table auth_permission
-- ----------------------------
ALTER TABLE [dbo].[auth_permission] ADD CONSTRAINT [auth_permission_content_type_id_2f476e4b_fk_django_content_type_id] FOREIGN KEY ([content_type_id]) REFERENCES [dbo].[django_content_type] ([id]) ON DELETE NO ACTION ON UPDATE NO ACTION
GO

